from PyQt4 import QtGui, QtCore

class ExecutePlugin(QtGui.QDialog):
    
    def __init__(self, parent, widget):
        QtGui.QWidget.__init__(self, parent)
        self.setWindowTitle(widget.windowTitle())
        
        widget.hide = self.hide
        
        v_box = QtGui.QVBoxLayout(self)
        v_box.addWidget(widget)
        
    def closeEvent(self, event):
        event.ignore()
        self.done(0)
